#include<stdio.h>
int init(int arr[],int n)
{
	int i = 0;
	for (i = 0; i < n; i++)
	{
		arr[i] = 0;
	}
	return 0;
}
void print(int arr[],int n)
{
	int i = 0;
	for (i = 0; i < n; i++)
	{
		printf("%d ", arr[i]);
	}
}
int reverse(int arr[],int right,int left)
{
	int temp = 0;
	int i = 0;
	int n = 0;
	while (left <= right)
	{
		temp = arr[right];
		arr[right] = arr[left];
		arr[left] = temp;
		right--;
		left++;
	}
	return 0;
}
int main()
{
	int arr1[5] = { 1,2,3,4,5 };
	int right = sizeof(arr1) / sizeof(arr1[0])-1;
	int left = 0;
	reverse(arr1,right,left);
	print(arr1,5);
	init(arr1,5);
	print(arr1,5);
	return 0;
}